#ifndef SERIALCONFIGDIALOG_H
#define SERIALCONFIGDIALOG_H

#include <QDialog>
#include <QLabel>
#include <QLineEdit>
#include <QPushButton>
#include <QComboBox>

class SerialConfigDialog : public QDialog
{
    Q_OBJECT

public:
    SerialConfigDialog(QString serialNumBox, int baudRate, QString parity, int dataBit,
                       QString stopBit, QWidget *parent=0);
    void initUI();

    QComboBox *serialNumBox, *baudRateBox, *parityBox, *dataBitBox, *stopBitBox;
    ~SerialConfigDialog();

private:
    QString serialNum;
    int baudRate;
    int dataBit;
    QString stopBit;
    QString parity;
    QPushButton *okBtn;
    QPushButton *cancelBtn;
};

QStringList exchangePlaceWithFirst(QStringList list, QString target);
#endif // SERIALCONFIGDIALOG_H
